<!DOCTYPE html>
<html>
  <head>
    <title>ISI - project - index</title>
    <link rel='stylesheet' href='/stylesheets/style.css' />
    <script src="/javascripts/jquery.js"></script>
    <script>
     
            $(document).ready(function(){
                $kw = $('#kw').attr('value');
                $l = '/search?'+$kw;
                $('#se').attr('href', $l);
                $('#btnSearch').click(function(){
                var query = $('#s').serialize();
                
                $.getJSON('search',query,function(data){
                    console.log('DATA: '+data);
                  });
              });
              });
            
    </script>
  </head>
  <body>
    <%- include header.ejs %>
       <div id='main'>
        <nav>
            <ul>
                <li>type1
                    <ul>
                        <li>SubType11</li> <li>SubType12</li> <li>SubType13</li>
                    </ul>
                </li>
                <li>type2<ul>
                        <li>SubType21</li> <li>SubType22</li> <li>SubType23</li>
                    </ul></li>
                <li>type3<ul>
                        <li>SubType31</li> <li>SubType32</li> <li>SubType33</li>
                    </ul></li>
                <li>type4<ul>
                        <li>SubType41</li> <li>SubType42</li> <li>SubType43</li>
                    </ul></li>
            </ul>
        </nav>
        <div id='center'>
     
            <div id='search'>Search bar
            <form id='s'>
                <input type='text' name='kw' id='kw'>
                <button type='button' id='btnSearch'>submit</button>
                <a  href='#' id='se' >Submit2</a>
            </form>
               
            </div>
            <div id='most_buy'>
                <div class='products'>Most buy 1</div>
                <div class='products'>Most buy 2</div>
                <div class='products'>Most buy 3</div>
                <div class='products'>Most buy 4</div>
            </div>
        </div>
        
    </div>
    <footer></footer>

  </body>
</html>